package com.fire.market.service.impl;

import com.fire.component.dto.SingleResponse;
import com.fire.component.extension.Assert;
import com.fire.market.gateway.api.dto.UserInfo;
import com.fire.market.gateway.api.service.UserQueryFrontService;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;

/**
 * UserQueryFrontServiceImpl
 *
 * @author zwd
 * @date 2021/7/21
 */
@Service
public class UserQueryFrontServiceImpl implements UserQueryFrontService {
    @Resource
    private UserQueryCoreService userQueryCoreService;

    @Override
    public SingleResponse<UserInfo> queryUserInfo(Integer userId) {
        Assert.notNull(userId, "userId is null");
        return SingleResponse.of(userQueryCoreService.queryUserInfo(userId));
    }
}
